//创建数据的小仓库
import {defineStore} from "pinia";
//@ts-ignore
import demoData from "@/assets/dataDemo/demoData.json" assert {type: 'json'};
//@ts-ignore
import {T_PrimInfo, T_SimData, T_SimInfo} from "@/assets/dataDemo/type.ts";

let getDataStore = defineStore('Data', {
    //小仓库
    state: (): any => {
        return {
            //这里存放属性值
            flightData: {} as { simData: T_SimData[], primInfo: T_PrimInfo, simInfo: T_SimInfo }
        }
    },

    //方法|异步
    actions: {
        getFlightData() {
            this.flightData = demoData
        }
    },

    //计算属性
    getters: {}
})
//对外暴露
export default getDataStore;